package com.example.blog.dao;

import java.sql.SQLException;
import java.util.List;

import org.junit.Test;


import com.example.blog.pojo.User;

import junit.framework.TestCase;

public class TestDemo {

	@Test
	public void test1() throws SQLException
	{
		UserDAO dao = new UserDAO();
		
		User u = new User();
		u.setUsername("zhangsa3");
		u.setPassword("123456");
		
		int result = dao.insert(u);
		
		// 断言
		TestCase.assertTrue(result==1);
	}
	

	
}

//  java.sql.SQLException: Column count doesn't match value count at row 1
// 插入语句里面字段的数量和数据库里的字段不一致
